package com.sise.thread.lab02;

import java.util.Hashtable;

/**
 * 作者：idea
 * 日期：2018/6/21
 * 描述：
 */

public class HashTable {
    static class hashTableDemo extends Thread{

        @Override
        public void run() {
            for(int i=0;i<100;i++){
//                try {
////                    Thread.sleep(100);
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
                hashtable.put(i+Thread.currentThread().getName(),""+i);
            }
        }
    }
    public static  Hashtable hashtable=new Hashtable();
    public static void main(String[] args) throws InterruptedException {
        for(int i=0;i<100000;i++){
            Thread hsd=new hashTableDemo();
            hsd.start();
            hsd.join();
        }
        System.out.println("this is end!!");
        System.out.println(hashtable.size());
    }

}
